interface FormulaItem{
    label:string,
    value:string,
    formula:string
}
export const formula:FormulaItem[] =  [
    {label: '面积', value: 'ar',formula: '宽*高*单价*数量'},
    {label: '长度', value: 'len',formula: '长度*单价*数量'},
    {label: '计数', value: 'ct',formula: '单价*数量'},
    {label: '体积', value: 'vol',formula: '体积*单价*数量'}
]

export const getFormula = (value: string): string | undefined => {
    return formula.find(item => item.value === value)?.formula;
};

export const getFormulaLabel = (value: string): string | undefined => {
    return formula.find(item => item.value === value)?.label;
};